home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / tk2.3 / dist / Makefile < prev    next >
Encoding:
Makefile  |  1992-12-03  |  3.5 KB  |  116 lines

  1. #
  2. # This is a simplified Makefile for use in Tk distributions.  Before using
  3. # it to compile Tk, you may wish to reset some of the following variables:
  4. #
  5. # TCL_DIR -        Name of directory holding tcl.h and tcl.a.
  6. # XLIB -        Name of archive containing Xlib binaries.
  7. #
  8.  
  9. # You may also wish to add some of the following switches to the CFLAGS
  10. # variable:
  11. #
  12. # -DX11R3        Causes code that depends on R4 facilities not to
  13. #            be compiled.  I haven't tested Tk with R3 in quite
  14. #            a while, so this switch may not be enough to
  15. #            generate a working R3 version of Tk.  Furthermore,
  16. #            use of this switch will disable some of the facilities
  17. #            of Tk related to window managers.
  18. # -DNO_PROTOTYPE    Turns off ANSI-style procedure prototypes and the
  19. #            corresponding compile-time checks.  Without this
  20. #            defininition, prototypes will be turned on if the
  21. #            compiler supports ANSI C by defining __STDC__.
  22. # -DTK_LIBRARY=\"dir\"    Arranges for dir, which must be the name of a
  23. #            directory, to be the library directory for Tk scripts.
  24. #            This value gets put into the variable $tk_library
  25. #            when a new application is created.  The library
  26. #            defaults to /usr/local/lib/tk, so you don't need the
  27. #            switch unless your library is in a non-standard place.
  28. #
  29.  
  30. TCL_DIR        =
  31. XLIB        = -lX11
  32. CC        = cc
  33. CFLAGS        = -I. -I$(TCL_DIR) -O -DTK_VERSION=\"2.3\" -DTK_LIBRARY=\"/sprite/lib/tcl\"
  34.  
  35. default : wish
  36.  
  37. LIBS = libtk.a -ltcl
  38.  
  39. WIDGOBJS = tkButton.o tkEntry.o tkFrame.o tkListbox.o \
  40.     tkMenu.o tkMenubutton.o tkMessage.o tkScale.o \
  41.     tkScrollbar.o
  42.  
  43. CANVOBJS = tkCanvas.o tkCanvArc.o tkCanvBmap.o tkCanvLine.o \
  44.     tkCanvPoly.o tkCanvText.o tkCanvWind.o tkRectOval.o \
  45.     tkTrig.o
  46.  
  47. TEXTOBJS = tkText.o tkTextBTree.o tkTextDisp.o tkTextIndex.o tkTextTag.o
  48.  
  49. OBJS = tk3d.o tkArgv.o tkAtom.o tkBind.o tkBitmap.o \
  50.         tkCmds.o tkColor.o tkConfig.o tkCursor.o tkError.o \
  51.         tkEvent.o tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o \
  52.         tkOption.o tkPack.o tkPlace.o tkPreserve.o tkSelect.o \
  53.         tkSend.o tkShare.o tkWindow.o tkWm.o $(WIDGOBJS) \
  54.     $(CANVOBJS) $(TEXTOBJS)
  55.  
  56. WIDGSRCS = tkButton.c tkEntry.c tkFrame.c tkListbox.c \
  57.     tkMenu.c tkMenubutton.c tkMessage.c tkScale.c \
  58.     tkScrollbar.c tkText.c tkTextBTree.c tkTextDisp.c \
  59.     tkTextIndex.c
  60.  
  61. CANVSRCS = tkCanvas.c tkCanvArc.c tkCanvBmap.c tkCanvLine.c \
  62.     tkCanvPoly.c tkCanvText.c tkCanvWind.c tkRectOval.c \
  63.     tkTrig.c
  64.  
  65. TEXTSRCS = tkText.c tkTextBTree.c tkTextDisp.c tkTextIndex.c tkTextTag.c
  66.  
  67. SRCS = tk3d.c tkArgv.c tkAtom.c tkBind.c tkBitmap.c \
  68.         tkCmds.c tkColor.c tkConfig.c tkCursor.c tkError.c \
  69.         tkEvent.c tkFont.c tkGet.c tkGC.c tkGeometry.c tkGrab.c \
  70.         tkOption.c tkPack.c tkPlace.c tkPreserve.c tkSelect.c \
  71.         tkSend.c tkShare.c tkWindow.c tkWm.c $(WIDGSRCS) \
  72.     $(CANVSRCS) $(TEXTSRCS)
  73.  
  74. wish: main.o $(LIBS)
  75.     $(CC) $(CFLAGS) main.o $(LIBS) $(XLIB) -lm -o wish
  76.  
  77. libtk.a: $(OBJS)
  78.     rm -f libtk.a
  79.     ar cr libtk.a $(OBJS)
  80.     ranlib libtk.a
  81.  
  82. $(TCL_DIR)/libtcl.a:
  83.     cd $(TCL_DIR); make libtcl.a
  84.  
  85. clean:
  86.     rm -f $(OBJS) main.o libtk.a wish    
  87.  
  88. $(OBJS): tk.h tkInt.h tkConfig.h
  89. $(WIDGOBJS): default.h
  90. $(CANVOBJS): default.h tkCanvas.h
  91. main.o: tk.h tkInt.h
  92.  
  93. #
  94. # Sprite additions
  95. #
  96.  
  97. HDRS = tk.h tkCanvas.h tkConfig.h tkText.h
  98.  
  99. install: installlib installscripts installman installwish installhdrs
  100.  
  101. installlib : libtk.a
  102.     update libtk.a /sprite/lib
  103.  
  104. installscripts :
  105.     update -l library/demos /sprite/lib/tcl/demos
  106.     update -l library/. /sprite/lib/tcl
  107.  
  108. installman :
  109.     update -l doc/. /sprite/man/lib/tk
  110.  
  111. installwish : wish
  112.     update wish /sprite/cmds
  113.  
  114. installhdrs : $(HDRS)
  115.     update -l $(HDRS) /sprite/lib/include
  116.